package org.example.service;

import org.example.commonapi.domain.FormData;
import org.example.commonapi.domain.R;
import org.example.commonapi.dto.SpeechAssessmentDTO;
import org.example.commonapi.response.bigmodel.SparkChatListener;
import org.example.commonapi.vo.CorrectionErrorVO;
import org.example.commonapi.vo.PhotoCalculateVO;
import org.example.commonapi.vo.WordScoreVO;
import org.example.utils.MyWebSocketClient;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;

public interface AiToolService {
    R<String> machineTranslate(String text, String from, String to);

    R<String> aiCheckVideo(String videoUrl) throws Exception;

    R<List<CorrectionErrorVO>> aiCorrectError(String text) throws Exception;

    R<String> aiTextRewrite(String text, String level) throws Exception;

    R<String> characterRecognition(String UID) throws Exception;

    R<String> pictureDocument(String uid, String type,String encoding) throws Exception;

    R<String> formulaRecognition(String uid) throws Exception;

    R<List<WordScoreVO>> speechAssessment(SpeechAssessmentDTO speechAssessmentDTO) throws Exception;

    R<String> getRandomSpeechText(String category);

    R<List<PhotoCalculateVO>> photoCalculate(String uid) throws Exception;

    R<List<Integer>> getToolFrequency(HttpServletRequest request);

    R updateToolFrequency(Integer idx, HttpServletRequest request);

    MyWebSocketClient realTimeASR(String source, SseEmitter sseEmitter) throws Exception;

    R<Integer> faceCompare(FormData formData,HttpServletRequest request) throws Exception;

    SparkChatListener analysisCode(StringBuilder question, StringBuilder answerCache) throws Exception;

    R stopRealTimeASR();

}
